BEGIN;
	CREATE FUNCTION calculate_request_item_suitability(requests,items) RETURNS NUMERIC AS $$
		SELECT
			CASE WHEN $1.category_id=$2.category_id THEN 3 ELSE 0 END
			+compare_arrays_normalize($1.tags,$2.tags)
			+compare_wordstrings_normalize($1.title,$2.name)
			+compare_wordstrings_normalize($1.description,$2.description)
	$$ LANGUAGE sql;
END;
